package com.hllxd.hism.star.basic.service.model.order;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * lixiyong 2020.11.04
 */
@Data public class HllAddressEntity {
    public Long code;
    public String name;
    public List<HllAddressEntity> items;

    public static HllAddressEntity build(Long id, String name) {
        HllAddressEntity thiz = new HllAddressEntity();
        thiz.code = id;
        thiz.name = name;
        thiz.items = null;
        return thiz;
    }

    public void addItem(HllAddressEntity e) {
        if(items==null) {
            items = new ArrayList<>();
        }
        items.add(e);
    }

}
